package com.dao;

import java.util.List;

import com.model.Tag;
import com.model.User;
import com.util.Page;

public interface UserDAO {

	List<User> findByNameOrEmail(String nameOrEmail);

	boolean addUser(User user);

	public void addUserTag(int tagId, int userId);

	public void deleteUserTag(int tagId, int userId);

	public boolean isTagExist(int tagId, int userId);

	public void addQuestionsNum(int id);

	public void reduceQuestionsNum(int id);

	public void addFavorNum(int id);

	public void addAnswersNum(int id);

	public void addArticleNum(int id);

	public void addFollowNum(int id);

	public void reduceFollowNum(int id);

	public void addFansNum(int id);

	public void reduceFansNum(int id);

	public void reduceScore(int id, int score);

	public void addScore(int id, int score);

	public boolean isNameExist(String name);

	public boolean isEmailExist(String email);

	void update(User user);

	User findById(int id);

	List<Tag> getUserTags(int userId);

	void reduceArticleNum(int userId);

	Page findActiveUserByPage(int page, int pageSize);
	
	Page findHotUserByPage(int page, int pageSize);

	boolean isPrivateUrlExist(String privateUrl, int excludeId);

	User findByPriUrl(String uri);
}
